Fix the build with docs
authorMatthias Clasen <mclasen@redhat.com>
Mon, 24 Feb 2020 13:22:22 +0000 (08:22 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 24 Feb 2020 13:22:51 +0000 (08:22 -0500)
This is fallout from filechooser api changes.

docs/tools/widgets.c

index d3ec172f79c6b8aef0e182b4098021cd54795b31..0dd0cda76f42ee18d7522c23ce46c6c890b5cb63 100644 (file)
@@ -593,6 +593,7 @@ create_file_button (void)
   GtkWidget *vbox2;
   GtkWidget *picker;
   char *path;
+  GFile *file;
 
   vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
   vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
@@ -615,8 +616,10 @@ create_file_button (void)
                                        GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
   gtk_widget_set_size_request (picker, 150, -1);
   path = g_build_filename (g_get_home_dir (), "Documents", NULL);
-  gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (picker), path);
+  file = g_file_new_for_path (path);
+  gtk_file_chooser_set_file (GTK_FILE_CHOOSER (picker), file, NULL);
   g_free (path);
+  g_object_unref (file);
   gtk_widget_set_halign (picker, GTK_ALIGN_CENTER);
   gtk_widget_set_valign (picker, GTK_ALIGN_CENTER);
   gtk_container_add (GTK_CONTAINER (vbox2), picker);